<?php

class State {
    private $name;
    private $id;
    private $actions;

    const ON_ENTRY = 'onentry';
    const ON_EXIT = 'onexit';
    const ON_DO = 'ondo';

    function  __construct($name = null, $id = null) {
        $this->setId($id);
        $this->setName($name);
    }

    public function getName() {
        return $this->name;
    }

    public function setName($name) {
        $this->name = $name;
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function setAction(Action $action, $event) {
        $this->actions[$event] = $action;
    }
}

?>
